﻿using UnityEngine;
using GraphProcessor;
using IQIGame.Onigao.Logic;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.Trigger + "/" + SkillEditorConst.SelfAttackOther, typeof(SkillEditorGraph))]
    public class SkillTriggerNode_SelfAttackOther : SkillTriggerNode
    {
        protected override ESkillTriggerType type => ESkillTriggerType.SelfAttackOther;

        [InspectorName("是否可被自身触发")] public bool triggerBySelf;
        [InspectorName("类型")] public EDamageType damageType;
        [InspectorName("Buff Tag")] public int desType;
        [InspectorName("伤害来源")] public EDamageFrom damageFrom;
        protected override SkillCustomConfig CreateConfig()
        {
            return new SkillTrigger_SelfAttackOther_ConfigData()
            {
                triggerBySelf = this.triggerBySelf,
                damageType = (int)this.damageType,
                desType = this.desType,
                damageFrom = (int)this.damageFrom
            };
        }
    }
}